package com.zyong.design.pattern.visitor.case3;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-03-30 01:16
 */
public class Client {
    public static void main(String[] args) {
        Circle circle = new Circle(5);
        Rectangle rectangle = new Rectangle(6, 8);

        ShapeCollection shapeCollection = new ShapeCollection();
        shapeCollection.addElement(circle);
        shapeCollection.addElement(rectangle);

        shapeCollection.accept(new AreaCalculator());
    }
}
